package com.ruoyi.controller;

import com.alibaba.fastjson2.JSONObject;
import com.ruoyi.common.AjaxResult;
import com.ruoyi.service.TestServiceInfo;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class TestController {

    @Resource
    TestServiceInfo serviceInfo;

    @RequestMapping("/open/test")
    public AjaxResult getTestResult(){
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("key","SDDN_1312");
        jsonObject.put("value","28.463");
        return AjaxResult.success("success-调用成功！",jsonObject);
    }

    @RequestMapping("/open/test2")
    public AjaxResult getTestResult2(){
        return AjaxResult.success("success-调用成功！",serviceInfo.testQuery());
    }
}
